home *** CD-ROM | disk | FTP | other *** search
- global cSizeList, cBound, gReleaseTime, gSkullObjList, gTrackingList, gMouseH, gMouseV, gReleaseAtTime
-
- on startMovie
- set the cpuHogTicks to the maxinteger
- set the randomSeed to the ticks
- preLoadCast(61, 84)
- set gMouseH to the mouseH
- set gMouseV to the mouseV
- setConstants()
- setGlobals()
- liberateSkull(getAt(gSkullObjList, 1))
- end
-
- on setConstants
- set cSizeList to [#t, #s, #m, #L]
- set baseCastNum to the number of cast "Movie PICT 10"
- set baseWidth to the width of cast baseCastNum / 2
- set baseHeight to the height of cast baseCastNum / 2
- set cBound to rect(baseWidth, baseHeight, 464 - baseWidth, 320 - baseHeight)
- end
-
- on setGlobals
- set gSkullObjList to []
- repeat with x = 1 to 5
- add(gSkullObjList, birth(script "Skulls Parent Script", x))
- puppetSprite(x, 1)
- end repeat
- set gReleaseTime to the ticks
- set gTrackingList to [1, 0, 0, 0, 0]
- set gReleaseAtTime to 500
- end
-
- on animateSkulls
- repeat with t = 1 to count(gSkullObjList)
- animateSkull(getAt(gSkullObjList, t))
- end repeat
- if (the ticks - gReleaseTime) > gReleaseAtTime then
- repeat with x = 1 to count(gTrackingList)
- set spriteToTry to x
- set whichUn to getAt(gTrackingList, spriteToTry)
- if not whichUn then
- liberateSkull(getAt(gSkullObjList, spriteToTry))
- exit repeat
- end if
- end repeat
- set gReleaseTime to the ticks
- end if
- end
-
- on waitfor seconds
- set now to the timer
- repeat while the timer < (now + (seconds * 60))
- if the mouseDown then
- exit
- end if
- end repeat
- end
-
- on randomInRange low, high
- return low + random(high - low + 1) - 1
- end
-